<?php 

include_once '../function.php';
// var_dump($_POST);

var_dump($_FILES);

if($_FILES['xbsfile']['size']<3000){
	echo "允许上传";
}else{
	echo "不允许上传";
}

$allowArr = ['jpg','png','gif'];

$arr = explode('.', $_FILES['xbsfile']['name']);

$type = end($arr);

var_dump($type);

if(!in_array($type, $allowArr)){
	echo "你上传的文件不符合要求";
}else{
	echo "你上传的文件符合要求";
}

// move_uploaded_file($_FILES['xbsfile']['tmp_name'], './'.$_FILES['xbsfile']['name']);
















 ?>